$(document).ready(function(){
    $('.goPage').click(function(){
        var page = $(this).attr('page');
        goPage(page);
    });
});

function goPage(page){
    var form = $('#pageForm');
    var p = $('#page');
    p.attr('value', page);
    form.submit();
}